package tools

import (
	"crypto/md5"
	"encoding/hex"
	"strings"
)

func Md5(contents []string) string {
	if contents == nil {
		return ""
	}
	contentValue := strings.Join(contents, "\u0001")
	hash := md5.Sum([]byte(contentValue))
	md5 := hex.EncodeToString(hash[:])
	return md5
}
